<template>
  <div class="hold-transition">
    <div class="content-header">
      <h1>
        统计分析
        <small>会员统计</small>
      </h1>
    </div>
    <div class="app-container">
      <div class="box">
        <div id="chart1" style="height:600px;"></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  mounted: function () {
         this.$http("api/report/totalMemberCounts").then((res)=>{
                
        var myChart1 = this.$echarts.init(document.getElementById("chart1"));
                myChart1.setOption({
                    
                        tooltip: {
                                    trigger: 'axis',
                                    formatter: res.data.data.totalCounts
                                        },

                xAxis: {
                    type: 'category',
                    data: res.data.data.yearAndMonths
                },
                yAxis: {
                    type: 'value'
                },
                series: [{
                    data: res.data.data.totalCounts,
                    type: 'line'
                }]
    });

         })
  },
};
</script>